package poly_array;

public class Person {
    private String name;
    private int age;
    public Person(String name, int age){
       setName(name);
       setAge(age);
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setAge(int age) {
        if(age >= 1){
            this.age = age;
        }
    }

    public int getAge() {
        return age;
    }

    public String say(){
        return "姓名：" + getName() + "，年龄：" + getAge();
    }
}
